<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>  
<!DOCTYPE html>
<html>
  <head>
        <script src="/website/resources/angular.min.js"></script>
   </head>
  <div ng-app="myApp" ng-controller="myCtrl">
  <form ng-submit="test1()">
名字: <input type="text" ng-model="name"><br>
密码: <input type="text" ng-model="pwd"><br>
s名字:{{sname}}<br>
	<button ng-click="test()">点我</button>
	</form>
</div>

<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope,$http) {
    $scope.name = "lu";
    $scope.pwd = "123";
     /* $scope.test = function($http){
    	 alert("aaa"); */ 
    	 $http.get('/website/user/test').then(function (response) {   
    	      $scope.sname = eval("("+response.data+")");
    	  });
  //  }
     $scope.test1 = function($http){
    	 alert("bbb"); 
    	 $http.get('/website/user/test',{params: {name:'5'}  
    	 }).success(alert(success));
     }
});
</script>
    
</html>